'''
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
'''


#import org.apache.jena.datatypes.DatatypeFormatException;
#import org.apache.jena.datatypes.RDFDatatype;

from abc import ABC, abstractmethod

class LiteralLabel (ABC):

    '''
     * Answer true iff this is a well-formed XML literal.
    '''
    # param 
    # result boolean
    @abstractmethod
    def isXML(self):
        pass

    '''
     * Answer true iff this is a well-formed literal.
    '''
    # param 
    # result boolean
    @abstractmethod
    def isWellFormed(self):
        pass

    '''
     * Answer true iff the wellformed flag is true. Does not test for datatype.
    '''
    # param 
    # result boolean
    @abstractmethod
    def isWellFormedRaw(self):
        pass

    '''
     * Answer a human-acceptable representation of this literal value.
     * This is NOT intended for a machine-processed result.
    '''
    # param boolean quoting
    # result String
    @abstractmethod
    def toString2(self, quoting):
        pass

    #@Override
    # param 
    # result String
    @abstractmethod
    def toString(self):
        pass

    '''
     * Answer the lexical form of this literal, constructing it on-the-fly
     * (and remembering it) if necessary.
    '''
    # param 
    # result String
    @abstractmethod
    def getLexicalForm(self):
        pass

    '''
     * Answer the value used to index this literal
     * TODO Consider pushing indexing decisions down to the datatype
    '''
    # param 
    # result Object
    @abstractmethod
    def getIndexingValue(self):
        pass

    '''
     * Answer the language associated with this literal (the empty string if
     * there's no language).
    '''
    # param 
    # result String
    @abstractmethod
    def language(self):
        pass

    '''
     * Answer a suitable instance of a Java class representing this literal's
     * value. May throw an exception if the literal is ill-formed.
    '''
    # param 
    # result Object
    # throws DatatypeFormatException
    @abstractmethod
    def getValue(self):
        pass

    '''
     * Answer the datatype of this literal, null if it is untyped.
    '''
    # param 
    # result RDFDatatype
    @abstractmethod
    def getDatatype(self):
        pass

    '''
     * Answer the datatype URI of this literal, null if it untyped.
    '''
    # param 
    # result String
    @abstractmethod
    def getDatatypeURI(self):
        pass

    '''
     * Answer true iff this literal is syntactically equal to <code>other</code>.
     * Note: this is <i>not</i> <code>sameValueAs</code>.
    '''
    #@Override
    # param Object other
    # result boolean
    @abstractmethod
    def equals(self, other):
        pass

    '''
     * Answer true if this literal represents the same (abstract) value as
     * the other one.  Two literals that are .equals are sameValueAs.
    '''
    # param LiteralLabel other
    # result boolean
    @abstractmethod
    def sameValueAs(self, other):
        pass

    '''
     * Answer the hashcode of this literal, derived from its value if it's
     * well-formed and otherwise its lexical form.
    '''
    #@Override
    # param 
    # result int
    @abstractmethod
    def hashCode(self):
        pass

    '''
     * Answer the default hash value, suitable for datatypes which have values
     * which support hashCode() naturally: it is derived from its value if it is
     * well-formed and otherwise from its lexical form.
    '''
    # param 
    # result int
    @abstractmethod
    def getDefaultHashcode(self):
        pass


